package com.woniu.jifen.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 订单
 * @TableName t_order
 */
@TableName(value ="t_order")
@Data
public class TOrder implements Serializable {
    /**
     * 订单编号
     */
    private Long id;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 订单类型id
     */
    private Integer typeId;

    /**
     * 用户手机号码
     */
    private String userTelephone;

    /**
     * 商品资费 如3元/月
     */
    private BigDecimal itemCost;

    /**
     * 来源渠道id
     */
    private Integer sourceId;

    /**
     * 下单时间
     */
    private Date createTime;

    /**
     * 支付方式id
     */
    private Integer orderPayId;

    /**
     * 订单业务类型
     */
    private Integer orderServiceTypeId;

    /**
     * 订单金额
     */
    private BigDecimal totalPrice;

    /**
     * 送货到的省市
     */
    private String province;

    /**
     * 收货人地址(物流类订单)
     */
    private Integer addressId;

    /**
     * 物流id
     */
    private Integer expressId;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 支付金额
     */
    private BigDecimal payPrice;

    /**
     * 是否开具发票 0未开具 1开具
     */
    private Integer isInvoice;

    /**
     * 收件人
     */
    private String receiver;

    /**
     * 收件人电话
     */
    private String receiverPhone;

    /**
     * 
     */
    private String idStr;

    /**
     * 优惠卷ID
     */
    private Integer couponId;

    /**
     * 优惠卷状态0可用/1不可用
     */
    private Integer couponStatus;

    /**
     * 支付积分
     */
    private Integer integral;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TOrder other = (TOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getUserTelephone() == null ? other.getUserTelephone() == null : this.getUserTelephone().equals(other.getUserTelephone()))
            && (this.getItemCost() == null ? other.getItemCost() == null : this.getItemCost().equals(other.getItemCost()))
            && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getOrderPayId() == null ? other.getOrderPayId() == null : this.getOrderPayId().equals(other.getOrderPayId()))
            && (this.getOrderServiceTypeId() == null ? other.getOrderServiceTypeId() == null : this.getOrderServiceTypeId().equals(other.getOrderServiceTypeId()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getAddressId() == null ? other.getAddressId() == null : this.getAddressId().equals(other.getAddressId()))
            && (this.getExpressId() == null ? other.getExpressId() == null : this.getExpressId().equals(other.getExpressId()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice()))
            && (this.getIsInvoice() == null ? other.getIsInvoice() == null : this.getIsInvoice().equals(other.getIsInvoice()))
            && (this.getReceiver() == null ? other.getReceiver() == null : this.getReceiver().equals(other.getReceiver()))
            && (this.getReceiverPhone() == null ? other.getReceiverPhone() == null : this.getReceiverPhone().equals(other.getReceiverPhone()))
            && (this.getIdStr() == null ? other.getIdStr() == null : this.getIdStr().equals(other.getIdStr()))
            && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
            && (this.getCouponStatus() == null ? other.getCouponStatus() == null : this.getCouponStatus().equals(other.getCouponStatus()))
            && (this.getIntegral() == null ? other.getIntegral() == null : this.getIntegral().equals(other.getIntegral()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getUserTelephone() == null) ? 0 : getUserTelephone().hashCode());
        result = prime * result + ((getItemCost() == null) ? 0 : getItemCost().hashCode());
        result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getOrderPayId() == null) ? 0 : getOrderPayId().hashCode());
        result = prime * result + ((getOrderServiceTypeId() == null) ? 0 : getOrderServiceTypeId().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getAddressId() == null) ? 0 : getAddressId().hashCode());
        result = prime * result + ((getExpressId() == null) ? 0 : getExpressId().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode());
        result = prime * result + ((getIsInvoice() == null) ? 0 : getIsInvoice().hashCode());
        result = prime * result + ((getReceiver() == null) ? 0 : getReceiver().hashCode());
        result = prime * result + ((getReceiverPhone() == null) ? 0 : getReceiverPhone().hashCode());
        result = prime * result + ((getIdStr() == null) ? 0 : getIdStr().hashCode());
        result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
        result = prime * result + ((getCouponStatus() == null) ? 0 : getCouponStatus().hashCode());
        result = prime * result + ((getIntegral() == null) ? 0 : getIntegral().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", status=").append(status);
        sb.append(", typeId=").append(typeId);
        sb.append(", userTelephone=").append(userTelephone);
        sb.append(", itemCost=").append(itemCost);
        sb.append(", sourceId=").append(sourceId);
        sb.append(", createTime=").append(createTime);
        sb.append(", orderPayId=").append(orderPayId);
        sb.append(", orderServiceTypeId=").append(orderServiceTypeId);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", province=").append(province);
        sb.append(", addressId=").append(addressId);
        sb.append(", expressId=").append(expressId);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", payPrice=").append(payPrice);
        sb.append(", isInvoice=").append(isInvoice);
        sb.append(", receiver=").append(receiver);
        sb.append(", receiverPhone=").append(receiverPhone);
        sb.append(", idStr=").append(idStr);
        sb.append(", couponId=").append(couponId);
        sb.append(", couponStatus=").append(couponStatus);
        sb.append(", integral=").append(integral);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}